import request from '@/utils/request'
/**
 * 超级用户相关API
 */
// 获取用户列表
export const getSuperUsers = data => {
  return request({
    method: 'POST',
    url: '/admin/super_user/get_super_users',
    data,
    auth: 'SuperUser'
  })
}
// 添加用户
export const addSuperUser = data => {
  return request({
    method: 'POST',
    url: '/admin/super_user/add_super_user',
    data,
    auth: 'AddSuperUser'
  })
}
// 重置用户密码
export const resetSuperUserPwd = data => {
  return request({
    method: 'POST',
    url: '/admin/super_user/reset_super_user_pwd',
    data,
    auth: 'ResetSuperUserPwd'
  })
}
// 修改用户状态
export const statusSuperUser = data => {
  return request({
    method: 'POST',
    url: '/admin/super_user/status_super_user',
    data,
    auth: 'DelSuperUser'
  })
}
// 分配用户角色
export const setRole = data => {
  return request({
    method: 'POST',
    url: '/admin/super_user/set_role',
    data,
    auth: 'SetRole'
  })
}
// 获取用户信息
export const getSuperUserInfo = data => {
  return request({
    method: 'POST',
    url: '/admin/super_user/get_super_user_info',
    data,
    auth: 'SuperUserCenter'
  })
}
// 保存用户头像
export const saveAvatar = data => {
  return request({
    method: 'POST',
    url: '/admin/super_user/save_avatar',
    data,
    auth: 'SuperUserCenter'
  })
}
// 保存用户信息
export const saveSuperUserInfo = data => {
  return request({
    method: 'POST',
    url: '/admin/super_user/save_super_user_info',
    data,
    auth: 'SuperUserCenter'
  })
}
// 获取用户信息
export const getSuperUserBindAccount = data => {
  return request({
    method: 'POST',
    url: '/admin/super_user/get_super_user_bind_account',
    data,
    auth: 'SuperUserCenter'
  })
}
// 保存用户邮箱
export const saveSuperUserEmail = data => {
  return request({
    method: 'POST',
    url: '/admin/super_user/save_super_user_email',
    data,
    auth: 'SuperUserCenter'
  })
}
